<?php
include '../config.php'; 
require '../db.php'; 
$id = $_GET['step'];
$act = $_GET['install'];
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type" />
  <title>Bazooka Setup</title>
  <style type="text/css">
  @import url(style.css);
  </style>
</head>
<body>
<div id="wrap">
<div id="head">
<div id="title">Bazooka Setup</div>
</div>
<div id="content">
<?php
if($act !== "ok") {
$settings = 0;
if($db_host == NULL) { echo "<div class=\"no\">NO</div> DB host <br />\n"; }
else { echo "<div class=\"ok\">OK</div> DB host<br />\n"; $settings++;}
if($db_user == NULL) { echo "<div class=\"no\">NO</div> DB user <br />\n"; }
else {echo "<div class=\"ok\">OK</div> DB user<br />\n"; $settings++;}
if($db_pass == NULL) { echo "<div class=\"no\">NO</div> DB password <br />\n"; }
else {echo "<div class=\"ok\">OK</div> DB password<br />\n"; $settings++;}
if($db_name == NULL) { echo "<div class=\"no\">NO</div> DB username <br />\n"; }
else {echo "<div class=\"ok\">OK</div> DB username<br />\n"; $settings++;}
if($db_prefix == NULL) { echo "<div class=\"no\">NO</div> DB prefix <br />\n"; }
else {echo "<div class=\"ok\">OK</div> DB prefix<br />\n"; $settings++;}
if($settings == 5) { echo "<br /><div class=\"yay\">All DB settings are defined!<br />Go ahead and <a href=\".?install=ok\">install!</a></div>"; }}
elseif(empty($id)) { 
?>
<strong class="header">Welcome to the Bazooka setup!</strong><br />
This installer will guide you through the simple setup of your Bazooka blog.  Just click next to continue.
<div class="next"><a href="?install=ok&step=userinfo">Next</a></div>
<?php
} else {if(file_exists(''.$id .'.php')) {include(''.$id .'.php');}}
?>
</div>
<div id="footer">Bazooka Setup 1.0.0</div>
</div>
</body>
</html>
